Wykres do poprawy

Źródło: strona internetowa Wydziału Matematyki i Nauk Informacyjnych Politechniki Warszawskiej https://ww4.mini.pw.edu.pl/.

Elementy wizualizacji wymagające według mnie poprawy:

Utworzona wizualizacja i potrzebny do tego kod


plot_ly(df, 
        x = ~reorder(Kraj, -Liczba), 
        y = ~Liczba, 
        type = 'bar',
        width = 900,
        color = ~kontynenty,
        colors = c("#a5ca39","#357799", "#3b4233")) %>%
  layout(title = list(text = '<b>The number of foreign students at the Faculty of Mathematics and Information Science</b>',
                      font = list(size = 20)),
         xaxis = list(title = '<b>Country</b>'),
         yaxis = list(title = '<b>The number of students</b>',
                      range = c(0, 36),
                      gridcolor = "black"),
         legend = list(title = list(text = 'Continent')),
         annotations = list(text = 'We are pleased to inform that 13% of our students come from abroad (as of November 2022)',
                           showarrow = FALSE,
                           xref = 'paper',
                           yref = 'paper',
                           x = 0.5,
                           y = 1.15),
         margin = list(l = 100, 
                       r = 100, 
                       b = 100, 
                       t = 100))

Według mnie ten wykres jest lepszy, ponieważ: